package com.soonfor.evaluate.bean;

import com.estronger.shopmanage.ui.othertask.bean.FileBean;
import com.soonfor.evaluate.tools.CommonUtils;

import java.util.ArrayList;

/**
 * author : DC-DingYG
 * e-mail : dingyg012655@126.com
 * time : 2019/01/07
 * desc : 回复详情
 */
public class ReplyDataBean {
    private String freply;
    private String freplydate;
    private ArrayList<FileBean> replyimgs;//回复实体图
    private ArrayList<String> imgpaths;//回复图路径

    public String getFreply() {
        return CommonUtils.formatStr(freply);
    }

    public void setFreply(String freply) {
        this.freply = freply;
    }

    public String getFreplydate() {
        String date = CommonUtils.formatStr(freplydate);
        if(date.equals("0")){
            date = "";
        }
        return date;
    }

    public void setFreplydate(String freplydate) {
        this.freplydate = freplydate;
    }

    public ArrayList<FileBean> getReplyimgs() {
        return replyimgs==null?new ArrayList<FileBean>():replyimgs;
    }

    public void setReplyimgs(ArrayList<FileBean> replyimgs) {
        this.replyimgs = replyimgs;
    }

    public ArrayList<String> getImgpaths() {
        if(imgpaths==null || imgpaths.size()==0) {
            if (replyimgs == null || replyimgs.size() == 0) {
                return new ArrayList<String>();
            } else {
                imgpaths = new ArrayList<>();
                for (int img = 0; img < replyimgs.size(); img++) {
                    imgpaths.add(replyimgs.get(img).getFpath());
                }
            }
        }
        return imgpaths;
    }

    public void setImgpaths(ArrayList<String> imgpaths) {
        this.imgpaths = imgpaths;
    }

}
